#!/bin/bash

showcommands(){
echo -e "qcom \t mode:1" 
echo -e "mtk(1) \t mode:2" 
echo -e "mtk(2) \t mode:3" 
}

showcommands

read -p "请输入mode: " mode

case $mode in
1)
adb root
adb remount
adb shell setenforce 0
adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_rail_on"
adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on"
adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_bus_on"
adb shell "echo 10000000 > /sys/class/kgsl/kgsl-3d0/idle_timer"
adb shell "echo 0 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel"
adb shell "echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel"
adb shell "echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor"
    ;;

2)
adb shell "echo 0 > /proc/gpufreqv2/fix_target_opp_index"
    ;;

3)
# echo 最大档位
adb shell "echo 1068000> /proc/gpufreq/Fgpufreq_opp_freq"
    ;;

esac
